Skip to content

Fix bootstrap after late plugin activation#549

Merged
chubes4 merged 2 commits into
mainfrom
fix/codebox-late-bootstrap
Jun 3, 2026
Merged

Fix bootstrap after late plugin activation#549
chubes4 merged 2 commits into
mainfrom
fix/codebox-late-bootstrap

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented Jun 3, 2026

Summary

  • Bootstrap Data Machine Code immediately when the plugin file is loaded after plugins_loaded has already fired.
  • Covers WP Codebox/Playground activation flows where the plugin constants load but datamachine_code_bootstrap() would otherwise never run.
  • Adds smoke coverage so github_issue_publish handler registration remains protected for late activation contexts.

Why

The wp-site-generator fanout fails in WP Codebox with required_handler_tool_unavailable because Data Machine Code is activated inside an already-loaded runtime. The plugin file loads, but the plugins_loaded callback is registered too late, so GitHub publish handlers never register on datamachine_tools.

Verification

  • php tests/smoke-github-issue-publish-handler.php
  • php -l data-machine-code.php && php -l tests/smoke-github-issue-publish-handler.php

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Diagnosing the WP Codebox late-activation failure, drafting the bootstrap fix, updating smoke coverage, and running focused verification. Chris remains responsible for review and merge.

@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented Jun 3, 2026

Homeboy Results — data-machine-code

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
ℹ️ Save lint baseline: homeboy lint data-machine-code --baseline
Deep dive: homeboy lint data-machine-code --changed-since cf7e6db

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/26916606817

Test

test — passed

ℹ️ Auto-fix lint issues: homeboy refactor data-machine-code --from lint --write
ℹ️ Collect coverage: homeboy test data-machine-code --coverage
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine-code --changed-since cf7e6db

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/26916606817

Audit

audit — passed

Deep dive: homeboy audit data-machine-code --changed-since cf7e6db

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-code-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-code-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-code/actions/runs/26916606817
Tooling versions
  • Homeboy CLI: homeboy 0.220.0+7d558b6
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 1f9ab9d7
  • Action: unknown@unknown

@chubes4 chubes4 merged commit 7c98fff into main Jun 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant